<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link href="https://cdn.bootcdn.net/ajax/libs/fullPage.js/2.8.4/jquery.fullpage.css" rel="stylesheet">
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/fullPage.js/2.8.4/jquery.fullpage.min.js"></script>
    <script src="./page.js" type="text/javascript" charset="utf-8"></script>
    <title></title>
    <script type="text/javascript">
      if(window.screen.width < 800){
        console.log('shouji');
      }else if(window.screen.width >= 800){
        console.log('pc');
        window.location.href= 'index.html'
      }
    </script>
    <style type="text/css">
      .a{
        width: 100%;
        height: 100%;
        position: relative;
        display: flex;
      }
      .a img{
        width: 100%;
        position: absolute;
        align-self: center;
      }
      #up{
        width: 60px;
        height: 60px;
        position: absolute;
        left: 50%;
        bottom: 0;
        z-index: 99999;
        opacity: .5;
        margin: 0 auto;
        text-align: center;
        margin-left: -30px;
        display: block;
      }
      
      
      .slide-top {
      	-webkit-animation: slide-top 2s infinite normal forwards;
      	        animation: slide-top 2s infinite normal forwards;
      }
      @-webkit-keyframes slide-top {
        0% {
          -webkit-transform: translateY(0);
                  transform: translateY(0);
                  opacity: 1;
        }
        100% {
          -webkit-transform: translateY(-50px);
                  transform: translateY(-50px);
                  opacity: 0;
        }
      }
      @keyframes slide-top {
        0% {
          -webkit-transform: translateY(0);
                  transform: translateY(0);
                  opacity: 1;
        }
        100% {
          -webkit-transform: translateY(-50px);
                  transform: translateY(-50px);
                  opacity: 0;
        }
      }
    </style>
  </head>
  <body>
    <div id="fullPage">
    </div>
      <img id="up" class="slide-top" src="css/up.png" >
    <script type="text/javascript">
    for (let i = 0; i < pageNum; i++) {
      if(i<10){
        i = "00" + i
      }else if(i>=10){
        i = "0" + i;
      }
      console.log(i);
      $("#fullPage").append(`<div class="section">
        <!-- 第${i}屏 -->
        <div class="a">
          <img src="${imageBookPath}/${i}.jpg" >
        </div>
      </div>`)
    }
        $('#fullPage').fullpage({
        });
        // let h = window.screen.height;
        // var imgH = $("img")[0].offsetHeight
        // console.log(h,imgH);
        // console.log((h - imgH) / 2);
        // let top = (h - imgH) + 'px';
        // $(".a").css('marginTop',top)
      
    </script>
  </body>
</html>
